﻿using System;
using System.Web.UI;
using UDS.Components;

namespace UDS.SubModule.AssginRule
{
    /// <summary>
    /// TreeView 的摘要说明。
    /// </summary>
    public partial class TreeViewPage : Page
    {
        protected internal const string RightListFrameName = "frmRightList";

        protected EntityType DisplayType
        {
            get;
            private set;
        }

        protected int SrcID
        {
            get;
            private set;
        }

        protected override void OnLoad(EventArgs e)
        {
            int value;
            if (!int.TryParse(Request.QueryString["SrcID"], out value))
            {
                value = 0;
            }
            SrcID = value;

            if (!int.TryParse(Request.QueryString["DisplayType"], out value))
            {
                value = (int)EntityType.Position;
            }
            DisplayType = (EntityType)value;

            base.OnLoad(e);
        }

#if false
        private void cmdAdd_ServerClick(object sender, EventArgs e)
        {
//			UDS.Components.AssignRights ar = new UDS.Components.AssignRights(classID,displaytype,(int)UDS.Components.AssignRightsAction.RULE_ADD,ObjID.Text,Act.Items[Act.SelectedIndex].Value,"");
//			try
//			{
//				if(ar.execute())
//					Response.Redirect("RightListview.aspx?ObjID="+ar.SrcID+"&displayType="+ar.DisplayType);
//			}
//			catch(Exception ex)
//			{
//				UDS.Components.Logger.Log(ex.ToString());
//				Server.Transfer("../Error.aspx");
//			}
        }
#endif
    }
}